import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/typePageList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const listClassName = (params) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/listClassName',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const listTypeName = () => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/listTypeName',
    method: 'get',
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/detail',
    method: 'get',
    params: {
      id
    }
  })
}


export const detailByTypeNo = (shopTypeNo) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/detailByTypeNo',
    method: 'get',
    params: {
      shopTypeNo
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}



export const add = (row) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/submit',
    method: 'post',
    data: row
  })
}

export const updateStatus = (row) => {
  return request({
    url: '/api/rb-oem/oem/shopType/shop_type/updateStatus',
    method: 'post',
    data: row
  })
}